set(SOURCE_DIR ${PROJECT_ROOT}/driver/gpio)
set(HEADER_DIR ${PROJECT_ROOT}/include/driver)

qelib_include_directories(${HEADER_DIR})

qelib_sources(
    ${SOURCE_DIR}/gpio.c)

set(INSTALL_HEADERS
    ${HEADER_DIR}/qe_gpio.h)

# Xilinx AXI GPIO
qelib_sources_ifdef(CONFIG_AXI_GPIO ${SOURCE_DIR}/axi_gpio.c)

# Xilinx PS7 GPIO
qelib_sources_ifdef(CONFIG_PS7_GPIO ${SOURCE_DIR}/ps7_gpio.c)

install(FILES ${INSTALL_HEADERS} DESTINATION ${QELIB_INSTALL_PATH}/include/driver)